<%@ page language="java" import="java.util.*" import="java.sql.*" pageEncoding="utf-8"%>
<html>
 <body>
 <%@ include file="dengluPublic.jsp" %>
    <%
    request.setCharacterEncoding("utf-8");
    String comment=request.getParameter("comment");
    String message=request.getParameter("message1");
    System.out.println(message);
    
     %>
     <% String driverClass1="com.mysql.jdbc.Driver";
	    String url1="jdbc:mysql://localhost:3306/vote?useSSL=false";
	    String user1="root";
	    String password1="womenilu2580";
	    Class.forName(driverClass1);
	    Connection conn1=DriverManager.getConnection(url1,user1,password1);	 
	    Statement stat1=conn1.createStatement();
	    String sql1="insert into comment values('"+customer.getCname()+"','"+comment+"','"+message+"')";
	    stat1.executeUpdate(sql1);	 
	   %> 
    <%
    response.sendRedirect("scienceNews.jsp");
     %>
    
  </body>
</html>
